
#include <BPainter>
#include <BRender>
#include <BState>

#include "Viewer.h"

Viewer::Viewer(BWidget* parent) : BViewer(parent)
{

}
Viewer::~Viewer()
{

}

void Viewer::event(const BEvent& event)
{
	BViewer::event(event);
	//BRender render(this);
	//
	//BState state;
	//state.setLighting(BState::State_Disable);
	//state.setDepthTest(BState::State_Enable);
	//state.setLineSmooth(BState::State_Enable);
	//state.setLineWidth(1);
	//render.setState(&state);
	//
	//BCamera* camera = this->camera();
	//if(camera)
	//{
	//	BNode* root = camera->root();
	//	DebugDrawer dd(root, &render);
	//}

	/*
	BVector a(-10, 0, 0);
	BVector b(10, 0, 0);
	BVector c(0, 0, 20);
	BState state;
	state.setLighting(BState::State_Disable);
	render.setState(&state);
	render.setColor(BColor(0, 1, 0));
	render.drawTriangle(a, b, c);

	BPainter painter(this);
	painter.setLineWidth(10);
	painter.setColor(BColor(0, 1, 0));
	painter.drawRect(10, 10, width()-20, height()-20);
	*/
}
